/**
 * Created by Shaobing on 24/05/2014.
 */
public class DiamondName extends Diamond{
    private final String name;

    public DiamondName(int n, String name) {
        super(n);
        this.name = name;
    }

    @Override
    public String toString(){
        StringBuilder stringBuilder = new StringBuilder();
        int i = 0;
        for (i = 0; i < _n - 1; i++) {
            stringBuilder.append(drawLine(i));
        }

        stringBuilder.append(name).append('\n');
        for(i = i - 1; i >= 0; i--){
            stringBuilder.append(drawLine(i));
        }

        return stringBuilder.toString();
    }


}
